<%-- 
    Document   : dispImg.jsp
    Created on : Nov 9, 2009, 12:38:00 PM
    Author     : sys9
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            try {
                System.out.println("************ In Disp" + session.getAttribute("is"));
                byte[] bytearray = new byte[1048576];
                int size = 0;
                java.io.InputStream sImage = (java.io.InputStream) session.getAttribute("is");
                response.reset();
                response.setContentType("image/jpeg");
                while ((size = sImage.read(bytearray)) != -1) {
		 System.out.println("***----------->" + sImage.available());
                    response.getOutputStream().write(bytearray, 0, size);
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        %>
    </body>
</html>
